package com.jin.webvideo.base.linkedfile.io;

import java.io.IOException;
import java.io.InputStream;

public class SeekableInputStream extends CacheInputStream implements Seekable{

    public SeekableInputStream(InputStream inputStream, int size, boolean forceFull) {
        super(inputStream, size, forceFull);
    }

    @Override
    public void seek(long pos) throws IOException{
        if (pos > Integer.MAX_VALUE) {
            throw new IOException("position exceeds the maximum");
        }
        position((int) pos);
    }
}
